package cn.ichar.customer.mq;

import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

/**
 * @author imaye
 * @date 2021/8/19
 */
@Component
@RocketMQMessageListener(topic = "test-topic-e", consumerGroup = "test-group-e")
public class Consumer2 implements RocketMQListener<String> {
    private Logger logger = LoggerFactory.getLogger(Consumer2.class);

    @Override
    public void onMessage(String s) {
        logger.info("收到消息：{},Thread:{}", s, Thread.currentThread().getName());
    }
}
